//
//  CSBAIrAlertSweeping.swift
//  CurSodoboAer
//
//  Created by CurSodoboAer on 2024/11/5.
//

import UIKit
import JDStatusBarNotification

class CSBAIrAlertSweeping: UIViewController {

    @IBOutlet weak var contetnPOertCSB: UITextView!
    override func viewDidLoad() {
        super.viewDidLoad()

        contetnPOertCSB.layer.cornerRadius = 20
        contetnPOertCSB.layer.masksToBounds = true
        
        contetnPOertCSB.contentInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
    }


    @IBAction func csbButtonClick(_ sender: UIButton) {
        
        self.navigationController?.popViewController(animated: true)
    }
    
    @IBAction func csbJuBaoBegon(_ sender: UIButton) {
        if let contentreason = contetnPOertCSB.text,contentreason.count > 0,"Enter your reason here...".contains(contentreason) == false{
            NotificationPresenter.shared.present("")
            NotificationPresenter.shared.displayActivityIndicator(true)
            
            DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1.5, execute: DispatchWorkItem(block: {
                NotificationPresenter.shared.dismiss()
                NotificationPresenter.shared.present("Thank you for your supervision. We will review your report as soon as possible", includedStyle: .success)
               
               
                self.navigationController?.popViewController(animated: true)
                
            }))
            
        }else{
            NotificationPresenter.shared.present("Please fill in the reason for your report", includedStyle: .warning)
        }
        
    }
}
